﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using WinDemo.Core;
using System.Windows.Forms;
 

namespace DefaultPlugin
{
    [PluginInfo("Default","1.0","XH","www.cnporter.com",true,2)]
    public class Default : WinDemo.Core.Iplugin
    {
        private Dictionary<string, EventHandler> _ChildNodes = new Dictionary<string, EventHandler>();
        private LeftNav frmLeftNav = new LeftNav(); 
        public static ILoadForm Formloader ;
        public Default()
        {

            _ChildNodes.Add("菜单五", (sender,e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("菜单四", (sender, e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("菜单三", (sender, e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("菜单二", (sender, e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("菜单一", (sender, e) =>
            {
                FormLoader.LoadNavFrm(frmLeftNav);
            });
        }

        

        public Image ModulePicture
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.Index));
            }
        }

        public Image ModulePictureEnter
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.IndexEnter));
            }
        }

        public Image ModulePictureClick
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.IndexClick));
            }
        }

        public string ModuleName
        {
            get
            {
                return "首页";
            }
        }

        public Dictionary<string, EventHandler> ChildNodes
        {
            get
            {
                return _ChildNodes;
            }
        }




        public bool IsLoad
        {
            get;
            set;
        }
        
        public ILoadForm FormLoader
        {
            get
            {
                return Formloader;
            }
            set
            {
                Formloader = value;
            }
        }



        public PluginInfoAttribute PluginInfo
        {
            get;
            set;
        }
    }

 
}
 
